home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 108 / MacAddict108.iso / Software / Internet & Communication / WordPress 1.5.1.dmg / wordpress / wp-admin / sidebar.php < prev    next >
Encoding:
PHP Script  |  2005-03-04  |  2.2 KB  |  81 lines

  1. <?php
  2. $mode = 'sidebar';
  3.  
  4. require_once('admin.php');
  5.  
  6. get_currentuserinfo();
  7.  
  8. if ($user_level == 0)
  9.     die ("Cheatin' uh ?");
  10.  
  11. if ('b' == $_GET['a']) {
  12.  
  13. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  14. <html xmlns="http://www.w3.org/1999/xhtml">
  15. <head>
  16. <title>WordPress › Posted</title>
  17. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
  18. <link rel="stylesheet" href="wp-admin.css" type="text/css" />
  19. </head>
  20. <body>
  21.     <p>Posted !</p>
  22.     <p><a href="sidebar.php">Click here</a> to post again.</p>
  23. </body>
  24. </html><?php
  25.  
  26. } else {
  27.  
  28. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  29. <html xmlns="http://www.w3.org/1999/xhtml">
  30. <head>
  31. <title>WordPress › Sidebar</title>
  32. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
  33. <link rel="stylesheet" href="wp-admin.css" type="text/css" />
  34. <style type="text/css" media="screen">
  35. form {
  36.     padding: 3px;
  37. }
  38. .sidebar-categories {
  39.     display: block;
  40.     height: 6.6em;
  41.     overflow: auto;
  42.     background-color: #f4f4f4;
  43. }
  44. .sidebar-categories label {
  45.     font-size: 10px;
  46.     display: block;
  47.     width: 90%;
  48. }
  49. </style>
  50. </head>
  51. <body id="sidebar">
  52. <h1 id="wphead"><a href="http://wordpress.org" rel="external">WordPress</a></h1>
  53. <form name="post" action="post.php" method="POST">
  54. <div><input type="hidden" name="action" value="post" />
  55. <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
  56. <input type="hidden" name="mode" value="sidebar" />
  57. <p>Title:
  58. <input type="text" name="post_title" size="20" tabindex="1" style="width: 100%;" />
  59. </p>
  60. <p>Categories:
  61. <span class="sidebar-categories">
  62. <?php dropdown_categories(); ?>
  63. </span>
  64. </p>
  65. <p>
  66. Post:
  67. <textarea rows="8" cols="12" style="width: 100%" name="content" tabindex="2"></textarea>
  68. </p>
  69. <p>
  70.     <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="Save as Draft" /> 
  71.     <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="Publish" /> 
  72.   
  73. </p>
  74. </div>
  75. </form>
  76.  
  77. </body>
  78. </html>
  79. <?php
  80. }
  81. ?>